# -*- coding:utf-8 -*-
class Image_info_data(object):
    '''
    通过配置文件和configparser来读取图像信息，最终得到的数据是都为小写，
    因此不能通过这种方法来初始数据，还是手动初始化。
    '''
    def  __init__(self):
        key = ['deviceType', 'actionNo', 'vehicleNo', 'deviceNo', 'laneNo',
               'addr', 'direct', 'channel', 'violationType', 'recordTime',
               'date', 'week', 'redlightStartTime', 'speed', 'plate', 'plateColor',
               'vehcileColor', 'vehcileType', 'featurePos', 'deviceIP', 'checkCode',
               'imageSize']
        value1 = ['LESDevice', '1', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630336', '20150402', '1', '02124500', '50','苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck1', '2048,2048']
        value2 = ['LESDevice', '2', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630338', '20150402', '1', '02124500', '60', '苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck2', '2048,2048']
        value3 = ['LESDevice', '3', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630340', '20150402', '1', '02124500', '62', '苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck3', '2048,2048']
        value4 = ['LESDevice', '4', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630340', '20150402', '1', '02124500', '62', '苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck3', '2048,2048']
        value5 = ['LESDevice', '5', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630340', '20150402', '1', '02124500', '62', '苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck3', '2048,2048']
        value6 = ['LESDevice', '6', '85', '0000000127', '0', '莱斯智能交通Lab', '1', '2', '闯红灯',
                   '20150402084630340', '20150402', '1', '02124500', '62', '苏A1493A', '蓝',
                   '3', '0', '1066,1666,1366,1960', '127.0.0.1', 'ck3', '2048,2048']
        #self.seq_image = [dict(zip(key, value1)), dict(zip(key, value2)), dict(zip(key, value3))]
        l1 = dict(zip(key, value1))
        l2 = dict(zip(key, value2))
        l3 = dict(zip(key, value3))
        l4 = dict(zip(key, value4))
        l5 = dict(zip(key, value5))
        l6 = dict(zip(key, value6))
        self.seq_image = [l1, l2, l3, l4, l5, l6]

    def get_seq_image_info(self):
        return self.seq_image


if __name__ == '__main__':
    import pprint
    test_seq_image = Image_info_data()
    test_seq_image_info = test_seq_image.get_seq_image_info()
    pprint.pprint(test_seq_image_info)
    print('图片数目', len(test_seq_image_info))
    print('图片信息数目', len(test_seq_image_info[0]))
